package com.shse.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface MyBatisUserDao {	
	
	@Update("update UserBalance set balance=balance-#{count} where userId=#{userId}")
	public void delMoney(@Param("userId")Long userId, @Param("count")double count);
	
	@Update("update UserBalance set balance=balance+#{count} where userId=#{userId}")
	public void addMoney(@Param("userId")Long userId, @Param("count")double count);
}



